package com.rmb.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @ClassName ConsumeMapper
 * @Description 趋势图
 * @Author lvshook
 * @Date 2021/1/22 10:47
 * @Version 1.0
 **/

@Mapper
public interface ConsumeMapper {

    /**
     * 查询
     * @param date1  01号
     * @param date2  30号
     * @param uid    用户id
     * @return       次数
     */
    @Select("SELECT SUM(price) FROM `cost_consume` where consume_date >= #{data1} and consume_date <= #{data2}   and uid = #{id}")
    Double getConsume(@Param("data1") String date1,@Param("data2") String date2,@Param("id") Long uid);
}
